import { isvalidatemobile,validateEmail } from "@/util/validate";

export function validatePhoneStyle(rule, value, callback){
    if (isvalidatemobile(value)[0]) {
      callback(new Error(isvalidatemobile(value)[1]));
    } else {
      callback();
    }
  }

  export function validateEmailStyle(rule, value, callback){
      var result = validateEmail(value);
    if (!result) {
      callback(new Error('邮件格式不正确'));
    } else {
      callback();
    }
  }